﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;
using YasharEl.Infrastructure.Core.Prototype;

namespace YasharEl.Infrastructure.Core.EntityModel.Prototype
{
    public abstract class AbstractPropertyInstanceEntity : Entity, IPropertyInstance
    {
        #region IPropertyInstance Implementations

        public virtual long PropertyId
        {
            get;
            set;
        }

        public virtual IPropertyMapping PropertyMapping
        {
            get;
            set;
        }

        public virtual IPropertyInstanceValue ValueReference
        {
            get;
            set;
        }

        public virtual IPrototypeEntity PrototypedEntity
        {
            get;
            protected internal set;
        }

        #endregion

        #region AbstractEntity<long> Overrides

        public override long Id
        {
            get
            {
                return PropertyId;
            }
            protected set
            {
                PropertyId = value;
            }
        }

        #endregion

        #region IPropertyInstance Abstraction

        public abstract ObjectType PrototypedObjectType
        {
            get;
            protected set;
        }

        #endregion
    }
}
